package com.yuan.myfactorybean;

import com.yuan.pojo.Student;
import org.springframework.beans.factory.FactoryBean;

//@Component("stu")
public class MyFactoryBean implements FactoryBean<Student> {
    @Override
    public Student getObject() throws Exception {
        return new Student();
    }

    @Override
    public Class<?> getObjectType() {
        return Student.class;
    }

    @Override
    public boolean isSingleton() {
        return true;
    }
}
